(1) Field of the Invention
This invention relates to a method and apparatus for suspending and resuming the execution of an application program during a power off/on cycle, which are applied to computer systems such as personal computers and workstations.
(2) Description of the Related Art
In former computer systems, storing device such as memory or registers provided to the systems could not hold data once the systems were powered off so that the previous status could not be resumed even when the systems were powered back on, if the power was turned off during the execution of a program.
Therefore, the user, when desired to power off during the operation and to restart it at a later time, needed the operations as shown in FIG. 1(a) and in the following, before powering off and after powering back on.
(Before powering off)
(1) Store the document being processed into a floppy disk PA1 (2) Terminate the execution of the word processing program PA1 (3) Set the floppy disk and start the operating system from the beginning (for example, MICRO SOFT MS-DOS) PA1 (4) Start the word processing program PA1 (5) Retrieve the stored document to process
(After powering back on)
Some of the recently developed portable personal computers named book type or notebook type have the function called resume function. This enables the user to restart his operation at the exact execution point at which it is suspended during a power off operation, thereby bypassing the above procedure. All the user has to do is to power off/on at any desired point as shown in FIG. 1(b).
Toshiba "DynaBook guide" states such a function is implemented by employing a battery built in the personal computer.
Such a personal computer seems to have a construction shown in FIG. 2 where a power unit 5006 having a battery 5008 is connected with an external power unit 5007 and a power switch 5112, and supplies power to a control board 5001, a display device 5105, an input device 5106, and an external storage unit 5005. The control board 5001 mounts a Central Processing Unit (CPU) 5101, a memory 5102, a display control unit 5002, an external storage controller 5003, and an input control unit 5004 thereon.
When the power switch 5112 is on, the power unit 5006 is supplied power from the external power unit 5007, and supplies the power to each unit of the personal computer and charges the battery 5008. If there is no supply from the external power unit 5007 (for example, not connected), it supplies power from the battery 5008 to each unit.
In contrary, when the power switch 5112 is off, the power unit 5006 supplies power from the battery 5008 only to the control board 5001 whether or not it is supplied power from the external power unit 5007. During the time, the entire operation of the personal computer looks in the stopped state with no display on the display device 5105 and no operation in the external storage unit 5005.
However, such data necessary to resume the execution of a program which was running at the time it was powered off as those stored in the memory 5102 or registers in the CPU 5101 is retained even after the switch 5112 has been turned off because the control board 5001 is supplied power from the battery as mentioned.
When the user turns on the power switch 5112 again at a later time, the display device 5105, the input device 5106, and the external storage unit 5005 are supplied power by the power unit 5006, and the unit 5005 and other units are initialized. Consequently, the previous screen is again displayed on the display device 5105 based on the graphic display data stored in the memory 5102, for example, thus, the state before the powering off operation is resumed, thereby, enabling the user to restart his operation.
Some of the Large Scale Integrated Circuits (LSIs) which are recently used as a CPU, a memory, or a control unit for an external unit have a mode called low power mode or sleeping mode in which the LSIs do not operate actively but just hold data by consuming just a small amount of power. Such LSIs can be used to more easily extend the period of time that data is retained after powering off operation, by using them in the low power mode after the powering off, and in the normal power mode after the powering back on.
Disclosed in U.S. Pat. No. 4,907,150 and others is a construction in which data stored in a memory or registers in the CPU is transferred to another memory backed up by a battery though the power supply to the CPU or the memory is stopped by powering off. According to this approach, it becomes easier to select a high-speed or compact device as the CPU or memory, without considering power demand.
However, such construction disclosed in the above references requires a memory with a larger capacity due to the massive data to be transferred thereto, therefore enlarging the hardware as well as raising manufacturing cost. Such a disadvantage appears considerably on the window system constructed so as to display windows on a bit-map-display.
Furthermore, the construction can not be applied to high-speed computer systems such as workstations, because they have large power demand and many of the LSIs used for them do not have the above mentioned low power mode. Therefore, for example, a battery having the capacity to retain a resumable state of a personal computer for a week can retain that of a workstation only for an hour. Also, such computer systems having a large capacity of the memory would require a large amount of power to retain the entire data in the low-demand memory to be transferred.
Limited resumable period of time gives a great restriction to the practical operations of workstations and other systems because they are mainly for business use so that it causes a severe damage to the users to lose stored data.
Another disadvantage is that some programs can not restart their operations even if system has returned to the previous status once the power is off. For example, in a program to communicate with another computer system, the opposite party cancels the communication at the time the powering off operation, where the resume function which unconditionally powers off, has a reverse effect to a smooth operation. Also, cancelling such a useless program resumption is nothing but a waste of time.